package com.globo.devsup.client.view;

import com.globo.devsup.client.presenter.Presenter;
import com.gwtext.client.core.RegionPosition;
import com.gwtext.client.widgets.Component;
import com.gwtext.client.widgets.Window;
import com.gwtext.client.widgets.layout.BorderLayoutData;

public abstract class WindowView extends Window implements IView {
	
	private Presenter presenter;
	
    public WindowView(Presenter presenter){
        setId(getID().name());
        this.presenter = presenter;
    }

    public Presenter getPresenter() {
    	return presenter;
    }
    
    public void add(Component component) {
        add(component, new BorderLayoutData(RegionPosition.CENTER));
    }
    
    public void mask() {
    	getEl().mask();
    }
    
    public void unmask() {
    	getEl().unmask();	
    }
}
